<template>
    <rx-layout>
        <div slot="center" style>
            <rx-fit>
                <div slot="toolheader" foldheader="true" foldbtn="false" border="false">
                    <rx-list-title :title="i18n('list.deliverLog','移交日志')"></rx-list-title>

                    <span class="search-btn-box">
                <span class="search-btn" @click="searchshow"><i class="iconfont iconguolv"></i>{{$ti18('rxList.leachBtn','过滤')}}</span>
           </span>
                </div>
                <div slot="searchbar" btnalign="right" v-if="fitSearch" @search="search" @cancel="cancel"
                     @close="close">
                    <a-form layout="vertical">
                        <a-form-item :label="i18n('form.tranAccount','移交人账号')">
                            <a-input :placeholder="i18n('form.tranAccount','移交人账号','input')" v-model="queryParam.Q_DELIVER_USER_NO__S_LK"/>
                        </a-form-item>
                        <a-form-item :label="i18n('form.transferee','移交人')">
                            <a-input :placeholder="i18n('form.transferee','移交人','input')" v-model="queryParam.Q_DELIVER_USER_NAME__S_LK"/>
                        </a-form-item>
                        <a-form-item :label="i18n('form.receAccout','接管人账号')">
                            <a-input :placeholder="i18n('form.receAccout','接管人账号','input')" v-model="queryParam.Q_RECEIPT_USER_NO__S_LK"/>
                        </a-form-item>
                        <a-form-item :label="i18n('form.receiver','接管人')">
                            <a-input :placeholder="i18n('form.receiver','接管人','input')" v-model="queryParam.Q_RECEIPT_USER_NAME__S_LK"/>
                        </a-form-item>
                    </a-form>
                </div>
                <rx-grid
                    ref="table"
                    :bordered="isBorder"
                    :allowRowSelect="true"
                    :multiSelect="true"
                    :columns="columns"
                    :defaultPageSize="10"
                    url="/api-bpm/bpm/core/bpmDeliverLog/query"
                    :queryParam="queryParam"
                    data-field="result.data"
                    :pageSizeOptions="['10','30','40']"
                    id-field="id"
                    @selectChange="onSelectChange"
                >
                </rx-grid>
            </rx-fit>
        </div>
    </rx-layout>
</template>

<script>
import BpmDeliverLogApi from '@/api/bpm/core/bpmDeliverLog'
import {BaseList, RxFit, RxGrid} from '@lowcode/jpaas-common-lib';

export default {
    name: 'BpmDeliverLogList',
    mixins: [BaseList],
    components: {
        RxFit
    },
    data() {
        return {
            columns: [
                {
                    title: this.$ti18('rxList.index','序号'),
                    type: 'indexColumn',
                    width: 40,
                    dataIndex: 'serial',
                    scopedSlots: {customRender: 'serial'}
                },
                {title: this.i18n('form.tranAccount','移交人账号'), dataIndex: 'deliverUserNo', width: 100},
                {title: this.i18n('form.transferee','移交人'), dataIndex: 'deliverUserName', width: 100},
                {title: this.i18n('form.receAccout','接管人账号'), dataIndex: 'receiptUserNo', width: 100},
                {title: this.i18n('form.receiver','接管人'), dataIndex: 'receiptUserName', width: 100},
                {title: this.$ti18('rxForm.createBy','创建人'), dataIndex: 'createByName', width: 100},
                {title: this.$ti18('rxForm.createTime','创建时间'), dataIndex: 'createTime', width: 100},
            ],
            comment: this.i18n('list.workLog','工作交接日志'),
            widthHeight: ['800px', '600px'],
            fitSearch: false,
        }
    },
    methods: {
        i18n(name, text, key) {
            return this.$ti18(name, text, "bpmDeliver", key);
        },
        delById(ids) {
            return BpmDeliverLogApi.del({ids: ids.join(',')});
        },
        getListByParams(parameter) {
            return BpmDeliverLogApi.query(parameter)
        }

    }
}
</script>
<style scoped>

</style>

